<template>
	<view class="container">
		<view class="content">
			<view class="header">
				<image src="../../static/toubu.png" mode=""></image>
				<view class="photo">
					<image :src="img" mode="aspectFill"></image>
				</view>
				<view class="text">
					<p>{{list}}</p>
				</view>
			</view>
			<view class="signlist">
				<view class="inner b-s" v-for="(item,index) in buyList" :key="index">
					<p>已报名，已缴费，<text>{{item.state}}</text></p>
					<p>{{item.examName}}</p>
					<p>开始日期：{{item.examTime | dateModule}}</p>
					<p>考试等级：{{item.leve}}</p>
				</view>
			</view>
		</view>
	</view>
	
</template>

<script>
	import {pay,paySignNum} from '../../apis'
	export default{
		data() {
			return{
				buyList:[],
				img:'',
				list:''
			}
		},
		onLoad(option) {
			// console.log(JSON.stringify(option))
			this.img = option.imageUrl
			pay().then((res)=>{
				let [err,data] = res
				console.log(data)
				this.buyList = data.data.data
			})
			paySignNum().then((res)=>{
				let [err,data] = res
				console.log(data)
				this.list = data.data.data
			})
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		
		.header{
			margin-top: 5px;
			height: 30px;
			width: 100%;
			position: relative;
			margin-bottom: 60px;
			.photo{
				width: 19%;
				height: 70px;
				position: absolute;
				top: 5px;
				left: 15px;
				border: 2px solid #c8c6c6;
				background-color: #fff;
				border-radius: 50%;
				image{
					width: 100%;
					height: 100%;
					border-radius: 50%;
				}
			}
			.text{
				// border: 1px solid #ccc;
				width: 70%;
				position: absolute;
				top: 40px;
				left: 100px;
				p{
					font-size: 12px;
					color: #5f5e5e;
				}
			}
		}
	}
</style>
